home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / obero / oberon_lib.lha / oberon-a / source1.lha / source / Amiga / BattClock.mod < prev    next >
Text File  |  1994-08-08  |  2KB  |  85 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: BattClock.mod $
  4.   Description: Interface to battclock.resource
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 00:50:27 $
  10.  
  11.   $VER: battclock.h 36.4 (1.5.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. MODULE BattClock;
  24.  
  25. (*
  26. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  27. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  28. ** $V- OvflChk       $Z- ZeroVars
  29. *)
  30.  
  31. IMPORT E := Exec;
  32.  
  33.  
  34. (*
  35. **
  36. **      BattClock resource name strings.
  37. **
  38. *)
  39.  
  40. CONST
  41.  
  42.   name   * = "battclock.resource";
  43.  
  44.  
  45. (**-- Resource Base variable --------------------------------------------*)
  46.  
  47. TYPE
  48.  
  49.   BattClockBasePtr = CPOINTER TO BattClockBase;
  50.   BattClockBase = RECORD (E.Node) END;
  51.  
  52. VAR
  53.  
  54.   base : BattClockBasePtr;
  55.  
  56.  
  57. (**-- Resource Functions ------------------------------------------------*)
  58.  
  59. (*
  60. **      $VER: battclock_protos.h 1.3 (3.5.90)
  61. *)
  62.  
  63. LIBCALL (base : BattClockBasePtr) ResetBattClock* ();
  64.   -6;
  65. LIBCALL (base : BattClockBasePtr) ReadBattClock* () : E.ULONG;
  66.   -12;
  67. LIBCALL (base : BattClockBasePtr) WriteBattClock* ( time [0] : E.ULONG );
  68.   -18;
  69.  
  70.  
  71. (**-- Resource Base variable --------------------------------------------*)
  72. (** $L- Address globals through A4 *)
  73.  
  74. (**-----------------------------------*)
  75. PROCEDURE OpenResource * (mustOpen : BOOLEAN);
  76.  
  77. BEGIN (* OpenResource *)
  78.   IF base = NIL THEN
  79.     base := E.base.OpenResource (name);
  80.     IF mustOpen & (base = NIL) THEN HALT (100) END;
  81.   END; (* IF *)
  82. END OpenResource;
  83.  
  84. END BattClock.
  85.